{  ACMP.RU
   Statement: http://acmp.ru/?main=task&id_task=169
   Verdict: Accepted
}
uses 
    SysUtils, Math;

var
    n,k,i,j:longint;
    a:array[0..40,0..40] of longint;

function go(n,k:longint):longint;
begin
if a[n][k]>-1 then result:=a[n][k] else
if n=k then result:=1 else
if (n*k=0) or (n>k) then result:=0 else begin
    result:=0;
    if k>n+1 then begin
        if a[n+1][k-1]=-1 then inc(result,go(n+1,k-1)) else
            inc(result,a[n+1][k-1]);
    end;
    if k>n-1 then begin
        if a[n-1][k-1]=-1 then inc(result,go(n-1,k-1)) else
            inc(result,a[n-1][k-1]);
    end;
end;
if a[n][k]=-1 then a[n][k]:=result;
end;
     
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n,k);
{fillchar(a,sizeof(a),0);
a[0][0]:=1;
for i:=1 to n do
    for j:=1 to k do
        a[i][j]:=a[i-1][j-1]+a[i+1][j-1];
write(a[n][k]);}
fillchar(a,sizeof(a),-1);
write(go(n,k));
end.